package com.qianyu.core.exception;

import com.qianyu.core.enumerate.ResultEnum;
import lombok.Data;

/**
 * @author wangzhic
 * @data 2020/8/4 13:49
 * 功能描述 自定义异常
 **/
@Data
public class ProxyException extends RuntimeException {
    /**
     * 功能描述 状态码
     */
    private Integer code;

    /**
     * 描述
     */
    private String message;

    public ProxyException(ResultEnum resultEnum) {
        super(resultEnum.getMsgTranslation());
        this.code = resultEnum.getCode();
        this.message = resultEnum.getMsgTranslation();
    }
}
